DIRECTORY ENTRY STRUCTURE ========================= Each directory entry takes up the first 18 bytes of each of the first 77 sectors on disk. The last 179 bytes in each of these sectors are unused (are all zeros). |<---------------------------------------------- one directory sector ----------------------------------------------->| 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 255 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+ +----+ | TY | N0 | N1 | N2 | N3 | N4 | N5 | N6 | N7 | N8 | N9 | D0 | D1 | A0 | A1 | B0 | B1 | SY | | 00 | 00 | 00 | .. | 00 | +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+ +----+ |<---------------------------------- one directory entry -------------------------------->| |<---- unused bytes ---->| Field meanings: --------------- TY = DATA TYPE: 00 = program, 01 = number array, 02 = character array, 03 = code, E4 = 2nd or later directory entry for same catalog entry, E5 = deleted directory entry) N0...N9 = DATA BLOCK NAME (10 characters, padded with trailing blanks) D0 = DATA BLOCK LENGTH (Low byte) A0 = PARAMETER 1 (Low byte) B0 = PARAMETER 2 (Low byte) D1 = DATA BLOCK LENGTH (High byte) A1 = PARAMETER 1 (High byte) B1 = PARAMETER 2 (High byte) SY = R/W-R/O, DIR-SYS ATTRIBUTES: SY bit 1 = 0 FOR R/W, SY bit 0 = 0 FOR DIR SY bit 1 = 1 FOR R/O SY bit 0 = 1 FOR SYS |
HEADER BLOCK STRUCTURE ====================== ______________Header block size (lower byte), always = 13 / ___________Header block size (upper byte), always = 00 / / ________Flag byte (00 for headers) / / / _____First byte of header (data type, 0 = Program, 1 = Numeric array, 2 = Character array, 3 = Code / / / / / / / / ______________________Data length (lower byte) / / / / / ___________________Data length (upper byte) / / / / / / ________________Parameter 1 lower byte (Start Addr lower half for Code) / / / / / / / _____________Parameter 1 upper byte (Start Addr upper half for Code) / / / / / / / / __________Parameter 2 lower byte (00 for Code) / / / / / / / / / _______Parameter 2 upper byte (80 for Code) / / / / / / / / / / ____Header XOR checksum (HFL to P21) / / / / / / / / / / / / / / / |------ file name blank padded -------| / / / / / / / HS0 HS1 HFL HTY N01 N02 N03 N04 N05 N06 N07 N08 N09 N10 DL0 DL1 P10 P11 P20 P21 HCK |---------------------- Spectrum-generated data --------------------------| Header fields dependent on data type ====================================
|
/path/to/executable | command | /path/to/devildisk.img | ... |
arg#1 | arg#2 | arg#3 ... |
Command | Command purpose |
---|---|
-c | Create an empty formatted floppy image (all sectors filled with the E5 byte) |
-l | Display the detailed contents of the floppy image file |
-x | Extract a specified range of catalog entries from the floppy image, to a directory having the name of the floppy image file (minus the .img extension), in a .TAP file. |
-w | Write the contents of a .TAP file given by arg#3 into the floppy image. |
-d | Delete the range of catalog entries specified by arg#3, from the floppy image |
-g | Defragments the free space on the floppy image specified by arg#2. |
-r0 | Mark all catalog entries in the range specified by arg#3 as R/W. |
-r1 | Mark all catalog entries in the range specified by arg#3 as R/O. |
-s0 | Mark all catalog entries in the range specified by arg#3 as DIR. |
-s1 | Mark all catalog entries in the range specified by arg#3 as SYS. |
-i | Interleave sectors on floppy image specified by arg#2. This floppy image must have a .dimg extension. The resulting floppy image is saved with the same name in the same directory but an .img extension. |
-di | De-interleaves sectors in the floppy image specified by arg#2. The resulting floppy image is saved with the same name but a .dimg extension, in the same directory. |
-t | List the contents of the .TAP file specified by arg#2. |
/path/to/executable -c /path/to/devildisk.img
|
/path/to/executable -l /path/to/devildisk.img [-deb]
|
The optional parameter -deb (debug) will list some extra low-level information:
|
![]() |
/path/to/executable -x /path/to/devildisk.img range [-log|-ver [-deb]]
|
Extracting data in normal mode. | Extracting data in verbose mode. |
![]() |
![]() |
/path/to/executable -w /path/to/devildisk.img /path/to/tapfile.tap [-ver [-deb]]
|
Writing data in normal mode. | Writing data in verbose mode. |
![]() |
![]() |
/path/to/executable -d /path/to/devildisk.img range [-ver [-deb]]
|
Deleting data in normal mode. | Deleting data in verbose mode. |
![]() |
![]() |
/path/to/executable -g /path/to/devildisk.img range [-ver [-deb]]
|
Defragmenting data in normal mode. | Defragmenting data in verbose mode. |
![]() |
![]() |
/path/to/executable -r0|-r1|-s0|-s1 /path/to/devildisk.img range [-ver [-deb]]
|
-r0 | Mark all catalog entries in the range specified by arg#3 as R/W. |
-r1 | Mark all catalog entries in the range specified by arg#3 as R/O. |
-s0 | Mark all catalog entries in the range specified by arg#3 as DIR. |
-s1 | Mark all catalog entries in the range specified by arg#3 as SYS. |
Attribute change in normal mode. | Attribute change in verbose mode. |
![]() |
![]() |
/path/to/executable -i /path/to/devildisk.dimg [-ver]
|
Interleave command in normal mode. | Interleave command in verbose mode. |
![]() |
![]() |
/path/to/executable -di /path/to/devildisk.img [-ver]
|
Deinterleave command in normal mode. | Deinterleave command in verbose mode. |
![]() |
![]() |
/path/to/executable -t /path/to/tapfile.tap [-ver]
|
.TAP file list command in normal mode. | .TAP file list command in verbose mode. |
![]() |
![]() |
![]() |
NOTE:Transferring a program containing headerless blocks to a DEVIL floppy image does not necessarily mean the program will actually run correctly in DEVIL. Some programs work, some don't, since DEVIL is not 100% compatible with the original Spectrum BASIC. An example of such program that runs correctly is "JOE BLADE", found on the GAMES2.img floppy image in my DEVIL disk archive. |
GUI at startup. | GUI with floppy image open. |
---|---|
![]() |
![]() |
GUI with .TAP file open in normal mode. | GUI with .TAP file open in verbose mode. |
---|---|
![]() |
![]() |
Status bar fields with floppy images. | Status bar fields with .TAP files. |
![]() |
![]() |
If a floppy image is open:
|
If a .TAP file is open:
|
Click the "Open Floppy Image" button, the "File Open" dialog shows up. | GUI with floppy image open. |
![]() |
![]() |
Click the "New Floppy Image" button. A dialog is shown to choose a directory to save the image. |
Next another dialog to enter the new floppy image name (the ".img" extension is added automatically) |
![]() |
![]() |
The new floppy image is saved. | |
![]() |
Select catalog entries and click the "Extract To .TAP" button. Then select the target directory and click OK. |
Enter a name for the .TAP file. The ".tap" extension will be added automatically. |
![]() |
![]() |
Status bar message confirming extraction. | Destination directory structure and files. |
![]() |
![]() |
Click the "Insert From .TAP" button and select a .TAP file. |
The contents of the .TAP file is inserted in the DEVIL catalog. |
![]() |
![]() |
Select one catalog entry and click the "Rename Cat. Entry" button. In this example, we rename "3D GAME" to "3D Game". |
The GUI is updated and shows the renamed catalog entry. |
![]() |
![]() |
Select catalog entries and click the "Delete Cat. Entries" button. A confirmation prompt is shown. |
After confirming by clicking "Yes", the entries are deleted. The GUI is updated with the new catalog contents. |
![]() |
![]() |
Select catalog entries and click the "Change Attributes" button. A dialog is shown to change attributes. |
After clicking "OK", the list contents is updated with the selected attributes. |
![]() |
![]() |
Click the "Interleave Image" button. A dialog is shown to select the non-interleaved image. |
Next another dialog is shown to select the target directory. |
![]() |
![]() |
The interleaved floppy image is saved. | |
![]() |
Click the "De-Interleave Image" button. A dialog is shown to choose the target directory. |
After clicking OK, the deinterleaved image is saved. |
![]() |
![]() |
The target directory contains the deinterleaved image. | |
![]() |
Click the "Open .TAP File" button, the "File Open" dialog shows up. | GUI with .TAP file open. |
![]() |
![]() |
GUI with info box hidden. | GUI with another .TAP file open. |
![]() |
![]() |
GUI with .TAP file open containing arrays. | GUI with corrupted .TAP file open. |
![]() |
![]() |
Select a binary file containing data for a new .TAP data block. | Select a flag byte for the new .TAP data block. |
![]() |
![]() |
Enter a name for the new .TAP file. | The new .TAP file is saved. |
![]() |
![]() |
Select exactly one .TAP data block and click "Extract to .BIN". | Select a target directory. |
![]() |
![]() |
Select a name for the new binary file and click "OK". | The new binary file is saved. |
![]() |
![]() |
Example of APPENDING new data blocks to the currently open .TAP file, from another .TAP file:
GUI with a .TAP file open and no selection, click the "Insert from .TAP/.BIN" button. |
Select "Insert from .TAP file" and click "OK". |
![]() |
![]() |
Choose a .TAP file to insert data blocks from and click "OK". | The new data blocks are APPENDED at the end of the currently open .TAP file. |
![]() |
![]() |
Example of INSERTING new data blocks into the currently open .TAP file, from another .TAP file:
GUI with a .TAP file open and ONE block selected, click the "Insert from .TAP/.BIN" button. |
Select "Insert from .TAP file" and click "OK". |
![]() |
![]() |
Choose a .TAP file to insert data blocks from and click "OK". | The new data blocks are INSERTED before the previously selected block in the currently open .TAP file. |
![]() |
![]() |
Example of APPENDING a data block to the currently open .TAP file, from a binary file:
GUI with a .TAP file open and no selection, click the "Insert from .TAP/.BIN" button. |
Select "Insert from .BIN file" and click "OK". |
![]() |
![]() |
Choose a .BIN file to insert a data block from and click "OK". | Enter a 2-digit hex value for the flag byte of the new block. |
![]() |
![]() |
The new data block is APPENDED at the end of the currently open .TAP file. |
![]() |
Example of INSERTING a data block into the currently open .TAP file, from a binary file:
GUI with a .TAP file open and ONE block selected, click the "Insert from .TAP/.BIN" button. |
Select "Insert from .BIN file" and click "OK". |
![]() |
![]() |
Choose a .BIN file to insert a data block from and click "OK". | Enter a 2-digit hex value for the flag byte of the new block. |
![]() |
![]() |
The new data block is INSERTED before the previously selected block, in the currently open .TAP file. |
![]() |
GUI with a .TAP file open and ONE header block selected, click the "Rename Header" button. |
A "Rename" dialog shows up, pre-filled with the current name stored in the header. |
![]() |
![]() |
Change the current name to a new name and click "OK". | The list is updated with the new name stored in the header block. |
![]() |
![]() |
GUI with a .TAP file open and ONE block selected, click the "Delete Block" button. |
A confirmation dialog shows up, click "Yes" to proceed. |
![]() |
![]() |
The data block is deleted and the list updated. |
![]() |
GUI with a .TAP file open and ONE headerless block selected, click the "Create Header" button. |
A dialog shows up, enter a name and loading address for the new header block. |
![]() |
![]() |
The header block is created and placed in front of the headerless block, transforming it into a "Code" block. |
![]() |